<template>
  <Kanban
    :colum="colum"
    :data="data"
    :maxRow="dictValue"
    type="customerKanban"
  />
</template>
<script>
import { Kanban } from '@/components/index';
import { clientBoardPage } from '@/api/after-sale/workOrderManage/order';
import { getStoreId, getServerDict } from '@/utils'

export default {
  components: {
    Kanban,
  },
  data () {
    return {
      colum: [{
        value: 'licensePlateNumber',
        name: '车牌'
      },
      {
        value: 'projectName',
        name: '当前进行项目作业'
      },
      {
        value: 'status',
        name: '状态',
        color: '#f40',
      },
      {
        value: 'userName',
        name: '作业人员'
      },
      {
        value: 'predictDeliveryDate',
        name: '预计交车时间'
      },
      ],
      data: [],
      dictValue: '',
    }
  },
  methods: {
    getListData () {
      clientBoardPage({ pageNo: 1, pageSize: 1000, storeId: getStoreId() }).then(res => {
        let { success, data } = res;
        if (success)
          this.data = data
      })
    }
  },
  async created () {
    let data = await getServerDict('客户工单看板展示最大条数');
    this.dictValue = data[0].dictValue;
    this.getListData();
  }
}
</script>